What does $([]) mean in jQuery

Posted by Sayem Ahmed on Stack Overflow See other posts from Stack Overflow or by Sayem Ahmed
Published on 2010-04-13T12:54:57Z Indexed on 2010/04/13 13:03 UTC
Read the original article Hit count: 351

Filed under:

I have come across the following jQuery code but could not understand it. What does the following code, specially the "$([])" part in the last line mean ?

var instrument = $("#instrument"),
    quantity = $("#quantity"),
    orderType = $("#orderType"),
    price = $("#price"),
    validityDate = $("#validityDate"),
    allFields = $([]).add(instrument).add(quantity).add(orderType).add(price).add(validityDate)

© Stack Overflow or respective owner

Related posts about jQuery